<template>
  <div>我是子组件 {{ str }} </div>
</template>

<script>
export default {
  props: ['str'],
  computed: {
    num() {
      console.log('我是子组件的计算属性-------------')
      return 100
    }
  },
  beforeCreate() {
    console.log('我是子组件的beforeCreate')
  },
  created() {
    console.log('我是子组件的created')
  },
  beforeMount() {
    console.log('我是子组件的beforeMount')
  },
  mounted() {
    console.log('我是子组件的mounted')
  },

  beforeUpdate() {
    console.log('子组件beforeUpdate')
  },
  updated() {
    console.log('子组件updated')
  }
}
</script>

<style>

</style>
